package cc.aiee.moneris.model;

import cc.aiee.core.interfaces.PayJsonBeanInterface;
import cc.aiee.core.kit.KitJson;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class MonerisPayRefundModel implements PayJsonBeanInterface {

	private String orderNo;
	// 金额,单位(分)
	private Integer amount;

	// 交易号
	private String txnNumber;

	/**
	 * Describes the category of e-commerce transaction being processed. Allowable
	 * values are:
	 * <ol>
	 * <li>Mail Order / Telephone Order—Single</li>
	 * <li>Mail Order / Telephone Order—Recurring</li>
	 * <li>Mail Order / Telephone Order—Instalment</li>
	 * <li>Mail Order / Telephone Order—Unknown classification</li>
	 * <li>Authenticated e-commerce transaction (VBV)</li>
	 * <li>Non-authenticated e-commerce transaction (VBV)</li>
	 * <li>SSL-enabled merchant</li>
	 * </ol>
	 * 
	 * In Credential on File transactions where the request field e-commerce
	 * indicator is also being sent: the allowable values for e-commerce indicator
	 * are dependent on the value sent for payment indicator, as follows:
	 * 
	 * <ul>
	 * <li>if payment indicator = R, then allowable values for e-commerce indicator:
	 * 2, 5 or 6</li>
	 * <li>if payment indicator = C, then allowable values for e-commerce indicator:
	 * 1, 5, 6 or 7</li>
	 * <li>if payment indicator = U, then allowable values for e-commerce indicator:
	 * 1 or 7</li>
	 * <li>if payment indicator = Z, then allowable values for e-commerce indicator:
	 * 1, 5, 6 or 7</li>
	 * </ul>
	 */
	private String crypt;
	/**
	 * 商家定义的描述（按每次交易发送）将显示在信用卡对帐单上。根据卡发行者的不同，该语句通常会显示动态描述符，该描述符附加在商户现有商户名称后，并以“
	 * /”字符分隔。请注意，商家的商户名称，正斜杠“ /”字符和动态描述符的总长度不能超过22个字符。 -例-
	 * 
	 * <li>现有企业名称：ABC绘画</li>
	 * 
	 * <li>动态描述符：预订12345</li>
	 * 
	 * <li>持卡人对账单显示：ABC绘画/预订1</li>
	 */
	private String descriptor;

	@Override
	public String toJson() {
		return KitJson.toJSONString(this);
	}

	@Override
	public String toJson(boolean prettyFormat, boolean ignoreNull) {
		return KitJson.toJSONString(this, prettyFormat, ignoreNull);
	}

}
